﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.Design;
using System.ComponentModel;
using System.Collections;
using System.Drawing.Design;

namespace Water.Web.Controls.Office.Excel
{
    [ToolboxItem(false)]
    public class Column
    {
        private string dataField;
        private string headerText;
        private string footerText;
        private int dataType=1;
        private int orientation;
        private int position;
        private bool subTotals=true;
        private string style;
        private string format;
        private Water.Web.Controls.SummaryType summaryFunction=SummaryType.No;
        private Water.Web.Controls.SummaryType pivotTableFunction  = SummaryType.No;


        [Browsable(true), Category("Data"), GlobalizeDescription("DataField")]
        public string DataField
        {
            get { return dataField; }
            set { dataField = value; }
        }

        [Browsable(true), Category("Data"), GlobalizeDescription("HeaderText")]
        public string HeaderText
        {
            get 
            {
                return Water.Web.Prompt.PromptProxy.GetPromptDesc(headerText); 
            }
            set { headerText = value; }
        }

        [Browsable(true), Category("Data"), GlobalizeDescription("FooterText")]
        public string FooterText
        {
            get 
            {
                return Water.Web.Prompt.PromptProxy.GetPromptDesc(footerText);
            }
            set { footerText = value; }
        }

        [Browsable(true), Category("Data"), GlobalizeDescription("DataType"),DefaultValue(1)]
        public int DataType
        {
            get { return dataType; }
            set { dataType = value; }
        }

        [Browsable(true), Category("Appearance"), GlobalizeDescription("Orientation")]
        public int Orientation
        {
            get { return orientation; }
            set { orientation = value; }
        }

        [Browsable(true), Category("Appearance"), GlobalizeDescription("Position")]
        public int Position
        {
            get { return position; }
            set { position = value; }
        }

        [Browsable(true), Category("Appearance"), GlobalizeDescription("SubTotals")]
        public bool SubTotals
        {
            get { return subTotals; }
            set { subTotals = value; }
        }

        [Browsable(true), Category("Appearance"), GlobalizeDescription("PivotTableFunction"), DefaultValue(SummaryType.No)]
        public Water.Web.Controls.SummaryType PivotTableFunction
        {
            get { return pivotTableFunction; }
            set { pivotTableFunction = value; }
        }

        [Browsable(true), Category("Appearance"), GlobalizeDescription("SummaryFunction"),DefaultValue(SummaryType.No)]
        public Water.Web.Controls.SummaryType SummaryFunction
        {
            get { return summaryFunction; }
            set { summaryFunction = value; }
        }

        [Browsable(true), Category("Appearance"), GlobalizeDescription("Style")]
        public string Style
        {
            get { return style; }
            set { style = value; }
        }

        [Browsable(true), Category("Appearance"), GlobalizeDescription("Format")]
        public string Format
        {
            get { return format; }
            set { format = value; }
        }

    }
}
